package com.ptszyxx.popose.module.main.home.adapter;

import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.tencent.qcloud.tuikit.tuichat.R;
import com.ysg.utils.YImageUtil;
import com.ysg.widget.pic.YPicUtils;

import java.util.List;

public class HomeWorldPicAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public HomeWorldPicAdapter() {
        super(R.layout.item_chat_user_pic);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, String item) {
        ImageView ivAvatar = holder.getView(R.id.ivAvatar);
        YImageUtil.show(ivAvatar, item);

        ivAvatar.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                List<String> data = getData();
                YPicUtils.getInstance().zoomPic(getContext(), data, holder.getAbsoluteAdapterPosition());
            }
        });
    }









}
